package com.ciwong.epaper.modules.epaper.ui.listenspeak;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.ciwong.epaper.R;

import java.util.List;

/**
 * Created by Administrator on 2017/1/4.
 */
public class ItemQuestionNumber extends LinearLayout{

    private  LinearLayout hand_question_number;

    public ItemQuestionNumber(Context context) {
        super(context);
        LayoutInflater.from(this.getContext()).inflate(R.layout.item_question_number, this);

        hand_question_number = (LinearLayout) findViewById(R.id.hand_question_number);
    }


    public void update(List<String> numList) {

        hand_question_number.removeAllViews();
        if (numList != null && numList.size() > 0) {


            for (int i=0;i<numList.size();i++) {
              View view=View.inflate(getContext(), R.layout.item_retry_question_number, null);
               TextView tx_question_number = (TextView) view.findViewById(R.id.tx_question_number);
                tx_question_number.setText(numList.get(i));

                hand_question_number.addView(view);
            }

        }


    }





}
